3.9 \(\int (a+b \sec ^2(e+f x)) \sin ^4(e+f x) \, dx\)

Optimal. Leaf size=70 \[ -\frac {(5 a-4 b) \sin (e+f x) \cos (e+f x)}{8 f}+\frac {3}{8} x (a-4 b)+\frac {a \sin (e+f x) \cos ^3(e+f x)}{4 f}+\frac {b \tan (e+f x)}{f} \]

[Out]

3/8*(a-4*b)*x-1/8*(5*a-4*b)*cos(f*x+e)*sin(f*x+e)/f+1/4*a*cos(f*x+e)^3*sin(f*x+e)/f+b*tan(f*x+e)/f

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 70, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {4132, 455, 1157, 388, 203} \[ -\frac {(5 a-4 b) \sin (e+f x) \cos (e+f x)}{8 f}+\frac {3}{8} x (a-4 b)+\frac {a \sin (e+f x) \cos ^3(e+f x)}{4 f}+\frac {b \tan (e+f x)}{f} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[e + f*x]^2)*Sin[e + f*x]^4,x]

[Out]

(3*(a - 4*b)*x)/8 - ((5*a - 4*b)*Cos[e + f*x]*Sin[e + f*x])/(8*f) + (a*Cos[e + f*x]^3*Sin[e + f*x])/(4*f) + (b
*Tan[e + f*x])/f

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 388

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(d*x*(a + b*x^n)^(p + 1))/(b*(n*
(p + 1) + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]

Rule 455

Int[(x_)^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[((-a)^(m/2 - 1)*(b*c - a*d)*
x*(a + b*x^2)^(p + 1))/(2*b^(m/2 + 1)*(p + 1)), x] + Dist[1/(2*b^(m/2 + 1)*(p + 1)), Int[(a + b*x^2)^(p + 1)*E
xpandToSum[2*b*(p + 1)*x^2*Together[(b^(m/2)*x^(m - 2)*(c + d*x^2) - (-a)^(m/2 - 1)*(b*c - a*d))/(a + b*x^2)]
- (-a)^(m/2 - 1)*(b*c - a*d), x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && IGtQ[
m/2, 0] && (IntegerQ[p] || EqQ[m + 2*p + 1, 0])

Rule 1157

Int[((d_) + (e_.)*(x_)^2)^(q_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> With[{Qx = PolynomialQ
uotient[(a + b*x^2 + c*x^4)^p, d + e*x^2, x], R = Coeff[PolynomialRemainder[(a + b*x^2 + c*x^4)^p, d + e*x^2,
x], x, 0]}, -Simp[(R*x*(d + e*x^2)^(q + 1))/(2*d*(q + 1)), x] + Dist[1/(2*d*(q + 1)), Int[(d + e*x^2)^(q + 1)*
ExpandToSum[2*d*(q + 1)*Qx + R*(2*q + 3), x], x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && N
eQ[c*d^2 - b*d*e + a*e^2, 0] && IGtQ[p, 0] && LtQ[q, -1]

Rule 4132

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_)]^(m_), x_Symbol] :> With[{ff = Fr
eeFactors[Tan[e + f*x], x]}, Dist[ff^(m + 1)/f, Subst[Int[(x^m*ExpandToSum[a + b*(1 + ff^2*x^2)^(n/2), x]^p)/(
1 + ff^2*x^2)^(m/2 + 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[m/2] && Integer
Q[n/2]

Rubi steps

\begin {align*} \int \left (a+b \sec ^2(e+f x)\right ) \sin ^4(e+f x) \, dx &=\frac {\operatorname {Subst}\left (\int \frac {x^4 \left (a+b+b x^2\right )}{\left (1+x^2\right )^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {a \cos ^3(e+f x) \sin (e+f x)}{4 f}-\frac {\operatorname {Subst}\left (\int \frac {a-4 a x^2-4 b x^4}{\left (1+x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{4 f}\\ &=-\frac {(5 a-4 b) \cos (e+f x) \sin (e+f x)}{8 f}+\frac {a \cos ^3(e+f x) \sin (e+f x)}{4 f}+\frac {\operatorname {Subst}\left (\int \frac {3 a-4 b+8 b x^2}{1+x^2} \, dx,x,\tan (e+f x)\right )}{8 f}\\ &=-\frac {(5 a-4 b) \cos (e+f x) \sin (e+f x)}{8 f}+\frac {a \cos ^3(e+f x) \sin (e+f x)}{4 f}+\frac {b \tan (e+f x)}{f}+\frac {(3 (a-4 b)) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{8 f}\\ &=\frac {3}{8} (a-4 b) x-\frac {(5 a-4 b) \cos (e+f x) \sin (e+f x)}{8 f}+\frac {a \cos ^3(e+f x) \sin (e+f x)}{4 f}+\frac {b \tan (e+f x)}{f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.30, size = 54, normalized size = 0.77 \[ \frac {12 (a-4 b) (e+f x)-8 (a-b) \sin (2 (e+f x))+a \sin (4 (e+f x))+32 b \tan (e+f x)}{32 f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[e + f*x]^2)*Sin[e + f*x]^4,x]

[Out]

(12*(a - 4*b)*(e + f*x) - 8*(a - b)*Sin[2*(e + f*x)] + a*Sin[4*(e + f*x)] + 32*b*Tan[e + f*x])/(32*f)

________________________________________________________________________________________

fricas [A]  time = 0.69, size = 68, normalized size = 0.97 \[ \frac {3 \, {\left (a - 4 \, b\right )} f x \cos \left (f x + e\right ) + {\left (2 \, a \cos \left (f x + e\right )^{4} - {\left (5 \, a - 4 \, b\right )} \cos \left (f x + e\right )^{2} + 8 \, b\right )} \sin \left (f x + e\right )}{8 \, f \cos \left (f x + e\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)*sin(f*x+e)^4,x, algorithm="fricas")

[Out]

1/8*(3*(a - 4*b)*f*x*cos(f*x + e) + (2*a*cos(f*x + e)^4 - (5*a - 4*b)*cos(f*x + e)^2 + 8*b)*sin(f*x + e))/(f*c
os(f*x + e))

________________________________________________________________________________________

giac [A]  time = 0.23, size = 89, normalized size = 1.27 \[ \frac {3 \, {\left (f x + e\right )} {\left (a - 4 \, b\right )} + 8 \, b \tan \left (f x + e\right ) - \frac {5 \, a \tan \left (f x + e\right )^{3} - 4 \, b \tan \left (f x + e\right )^{3} + 3 \, a \tan \left (f x + e\right ) - 4 \, b \tan \left (f x + e\right )}{{\left (\tan \left (f x + e\right )^{2} + 1\right )}^{2}}}{8 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)*sin(f*x+e)^4,x, algorithm="giac")

[Out]

1/8*(3*(f*x + e)*(a - 4*b) + 8*b*tan(f*x + e) - (5*a*tan(f*x + e)^3 - 4*b*tan(f*x + e)^3 + 3*a*tan(f*x + e) -
4*b*tan(f*x + e))/(tan(f*x + e)^2 + 1)^2)/f

________________________________________________________________________________________

maple [A]  time = 0.94, size = 92, normalized size = 1.31 \[ \frac {a \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )+b \left (\frac {\sin ^{5}\left (f x +e \right )}{\cos \left (f x +e \right )}+\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )-\frac {3 f x}{2}-\frac {3 e}{2}\right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(f*x+e)^2)*sin(f*x+e)^4,x)

[Out]

1/f*(a*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)+b*(sin(f*x+e)^5/cos(f*x+e)+(sin(f*x+e)^3+
3/2*sin(f*x+e))*cos(f*x+e)-3/2*f*x-3/2*e))

________________________________________________________________________________________

maxima [A]  time = 0.45, size = 82, normalized size = 1.17 \[ \frac {3 \, {\left (f x + e\right )} {\left (a - 4 \, b\right )} + 8 \, b \tan \left (f x + e\right ) - \frac {{\left (5 \, a - 4 \, b\right )} \tan \left (f x + e\right )^{3} + {\left (3 \, a - 4 \, b\right )} \tan \left (f x + e\right )}{\tan \left (f x + e\right )^{4} + 2 \, \tan \left (f x + e\right )^{2} + 1}}{8 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)*sin(f*x+e)^4,x, algorithm="maxima")

[Out]

1/8*(3*(f*x + e)*(a - 4*b) + 8*b*tan(f*x + e) - ((5*a - 4*b)*tan(f*x + e)^3 + (3*a - 4*b)*tan(f*x + e))/(tan(f
*x + e)^4 + 2*tan(f*x + e)^2 + 1))/f

________________________________________________________________________________________

mupad [B]  time = 4.40, size = 79, normalized size = 1.13 \[ x\,\left (\frac {3\,a}{8}-\frac {3\,b}{2}\right )-\frac {\left (\frac {5\,a}{8}-\frac {b}{2}\right )\,{\mathrm {tan}\left (e+f\,x\right )}^3+\left (\frac {3\,a}{8}-\frac {b}{2}\right )\,\mathrm {tan}\left (e+f\,x\right )}{f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^4+2\,{\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}+\frac {b\,\mathrm {tan}\left (e+f\,x\right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(e + f*x)^4*(a + b/cos(e + f*x)^2),x)

[Out]

x*((3*a)/8 - (3*b)/2) - (tan(e + f*x)^3*((5*a)/8 - b/2) + tan(e + f*x)*((3*a)/8 - b/2))/(f*(2*tan(e + f*x)^2 +
 tan(e + f*x)^4 + 1)) + (b*tan(e + f*x))/f

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec ^{2}{\left (e + f x \right )}\right ) \sin ^{4}{\left (e + f x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)**2)*sin(f*x+e)**4,x)

[Out]

Integral((a + b*sec(e + f*x)**2)*sin(e + f*x)**4, x)

________________________________________________________________________________________